package com.gljx.web.service;


import com.gljx.web.Entity.InwareHouse;
import com.gljx.web.Entity.InwareHouseEntry;
import com.gljx.web.Entity.User;

import java.util.List;
import java.util.Map;

/**
 * Created by rhc on 2018/5/22 0022.
 */
public interface InwareHouseService {

    Map<String, Object> selectPage(int pindex, String psql, int psize);

    Map<String, Object> selectPageCount(String psql);


    /**
     *批量添加
     * @param inwareHouse
     * @param rkGoodsname
     * @param rkGoodsid
     * @param rkGoodstype
     * @param rkGgid
     * @param rkGoodsprice
     * @param rkInwarehouseprice
     * @param rkInwarehousequantity
     * @param rkInwarehousetotalprices
     * @param rkInwarehouseuse
     * @param fseq
     * @param user
     * @param fnumber
     * @param fcreatetime
     */
    void addInwareHouse(InwareHouse inwareHouse, String[] rkGoodsname,String[]rkGoodsid, String[] rkGoodstype, String[] rkGgid,
                          String[] rkGoodsprice, String[] rkInwarehouseprice, String[] rkInwarehousequantity, String[] rkInwarehousetotalprices, String[] rkInwarehouseuse, String[]fseq,User user
                      ,String fnumber,String fcreatetime);
    /**
     *批量修改
     * @param inwareHouse
     * @param rkGoodsname
     * @param rkGoodsid
     * @param rkGoodstype
     * @param rkGgid
     * @param rkGoodsprice
     * @param rkInwarehouseprice
     * @param rkInwarehousequantity
     * @param rkInwarehousetotalprices
     * @param rkInwarehouseuse
     * @param user
     * @param time
     */
    void editInwareHouse(InwareHouse inwareHouse, String[] rkGoodsname,String[]rkGoodsid, String[] rkGoodstype, String[] rkGgid,
                        String[] rkGoodsprice, String[] rkInwarehouseprice, String[] rkInwarehousequantity, String[] rkInwarehousetotalprices, String[] rkInwarehouseuse, User user,
                        String time,String[]fseq);

    /**
     * 删除和批量删除
     * @param fid
     * @param deleteId
     * @param fnumber
     * @param fnumber2
     */
    void deleteInwareHouseByFid(String fid, String[] deleteId, String[] fnumber, String fnumber2);
    /**
     *查询通过fid查询InwareHouse
     * @param fid
     * @return
     */
    InwareHouse selectByfid(String fid);


    //查询

    /**
     *通过创建者id获取所有Inwarehouse
     * @param fcreatorid
     * @return
     */
    List<InwareHouse> selectInwareHouseByCreaterId(String fcreatorid);

    /**
     * 通过父表id进行查询
     *
     * @param fparentid
     * @return
     */
    List<InwareHouseEntry> queryInwareHouseEntry(String fparentid);

    /**
     * 通过自身的fid得到对应的InwareHouseEntry
     * @param fid
     * @return
     */
    InwareHouseEntry selectInwareHouseById(String fid);

    /**
     * 通过父类id,物品名称,物品类型
     * @param fparentid
     * @param goodsName
     * @param goodsType
     * @return
     */
    List<InwareHouseEntry> selectInwareHouseEntry(String fparentid,String goodsName,String goodsType);

    int updateInwareHouse(InwareHouse inwareHouse);

    /**
     * 审核
     * @param fid
     * @param type
     * @param fhandlerId
     * @param inwareHouseEntries
     * @param message
     * @param state
     * @param fnumber
     * @return
     */

    int auditInwaHouse(String fid, String type, String fhandlerId, List<InwareHouseEntry> inwareHouseEntries, String message, String state, String fnumber,User user);

    /**
     *导出
     * @param fcompanyid
     * @param rkGoodsname
     * @param rkGoodstype
     * @param beginTime
     * @param endTime
     * @return
     */
    List<InwareHouseEntry> selectInwareHouseByInfo(String fcompanyid, String rkGoodsname, String rkGoodstype, String beginTime, String endTime);
}
